from rest_framework import serializers

from apps.goods.models import GoodsVisitCount


class UserCategoryCountSerializer(serializers.ModelSerializer):
    category = serializers.StringRelatedField(label='名称')

    class Meta:
        model = GoodsVisitCount
        fields = ['count', 'category']